import 'dart:io';

import 'package:dartkit/dartkit.dart';
import 'package:hive/hive.dart';
import 'package:test/test.dart';

void main() async {
  Hive.init("writer_hive_test");
  final box = await Hive.openBox<Json>("box");

  tearDown(() => Directory("writer_hive_test").deleteIf());

  final IdentityWriter<PseudoPeople> writer = HiveIdentityWriter(
    box: box,
    unzip: (raw) => PseudoPeople.fromRaw(raw),
  );

  testRawableWriter(writer);
  testIdentityWriter(writer);
}
